Use env. variable GLUSTER_BLOCK_ENABLED to enable/disable gluster-block-service#122
Use env. variable GLUSTER_BLOCK_ENABLED to enable/disable gluster-block-service#122nixpanic wants to merge 1 commit intogluster:masterfrom
Conversation
|
@nixpanic But status-probe refers the variable GLUSTER_BLOCKD_STATUS_PROBE_ENABLE( which is for whether to check gluster blockd status or not) Note: |
|
On Tue, Jan 15, 2019 at 03:51:06AM -0800, Saravanakumar Arumugam wrote:
@nixpanic But status-probe refers the variable GLUSTER_BLOCKD_STATUS_PROBE_ENABLE( which is for whether to check gluster blockd status or not)
Here, it is GLUSTER_BLOCK_ENABLED which is for whether enable/disable GLUSTER_BLOCK ?
Note:
It is good idea to merge them both, but currently they are different variables(with different meaning).
Ah, right! I'll rename them and only keep the one we have in
gluster-kubernetes and openshift-ansible.
|
…ck service. Enable gluster-block services if GLUSTER_BLOCK_ENABLED is "1" and disable otherwise. By default, GLUSTER_BLOCK_ENABLED is set as "1". When gluster-block is disabled, the status-probe.sh script should not check for its status. Updates: gluster#120 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com>
9b1aeba to
35a40b8
Compare
|
I have modified the |
phlogistonjohn
left a comment
There was a problem hiding this comment.
Looks reasonable enough to me.
| #FIXME To update in environment file | ||
| sed -i '/GB_GLFS_LRU_COUNT=/s/GB_GLFS_LRU_COUNT=.*/'GB_GLFS_LRU_COUNT="$GB_GLFS_LRU_COUNT"\"'/' /usr/lib/systemd/system/gluster-blockd.service | ||
| sed -i '/EnvironmentFile/i Environment="GB_LOGDIR='$GB_LOGDIR'"' /usr/lib/systemd/system/gluster-blockd.service | ||
| if [ "$GLUSTER_BLOCK_ENABLED" == 1 ]; then |
There was a problem hiding this comment.
Here, 1 is numeric value => eq is better.
There was a problem hiding this comment.
< This change was recently reverted with commit f5409d9. With a small correction to the change, this should now function as expected. The status-probe.sh script checks the value for GLUSTER_BLOCK_ENABLED and compares it to 1. However the update-params.sh script set the variable by default to TRUE. gluster-kubernetes and openshift-ansible both set the variable to "1" by default, so should update-params.sh.
This needs an update too
| if [ "$GLUSTER_BLOCK_ENABLED" == 1 ]; then | ||
| echo "Enabling gluster-block service and updating env. variables" | ||
| systemctl enable gluster-block-setup.service | ||
| systemctl enable gluster-blockd.service |
There was a problem hiding this comment.
Is the actual issue mentioned here issue #120 resolved here? Please reboot the node and see whether this specific line executes fine.
|
Closing as stale. |
Enable gluster-block services if
GLUSTER_BLOCK_ENABLEDis"1"and disable otherwise.By default,
GLUSTER_BLOCK_ENABLEDis set as"1".This change was recently reverted with commit f5409d9. With a small correction to the change, this should now function as expected. The
status-probe.shscript checks the value forGLUSTER_BLOCK_ENABLEDand compares it to1. However theupdate-params.shscript set the variable by default toTRUE. gluster-kubernetes and openshift-ansible both set the variable to"1"by default, so shouldupdate-params.sh.Updates: #120